package com.chengcang.api.modules.sys.dto;

import com.chengcang.common.validator.group.AddGroup;
import com.chengcang.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;


/**
 * 客户管理
 *
 * @author zhanli
 * @since 1.0.0 2023-01-05
 */
@Data
@ApiModel(value = "客户管理")
public class SysTenantDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "客户编号")
    private String tenantCode;

    @NotBlank(message = "客户名称不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "客户名称",required = true)
    private String name;

    @ApiModelProperty(value = "助记名称")
    private String shortName;

    @NotNull(message = "客户类型不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "客户类型  0 工厂 1 公司 2 散户")
    private Integer tenantType;

    @ApiModelProperty(value = "客户类型名称")
    private String tenantTypeName;

    @NotNull(message = "客户状态不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "客户状态 0 使用 1 暂停")
    private Integer status;

    @ApiModelProperty(value = "客户状态名称")
    private String statusName;

    @ApiModelProperty(value = "绑定类型,多个逗号隔开")
    private String bindings;

    @ApiModelProperty(value = "绑定客户，多个逗号隔开")
    private String bindingCustomers;

    @ApiModelProperty(value = "客户来源")
    private Integer source;

    @ApiModelProperty(value = "客户来源名称")
    private String sourceName;

    // 账号
    @NotBlank(message = "联系人姓名不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "联系人姓名")
    private String realName;

    @NotBlank(message = "手机号不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "用户类型")
    private Integer userType;

    @ApiModelProperty(value = "用户类型名称")
    private String userTypeName;

    @NotNull(message = "尊称不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "尊称 0 先生 1 女士 2 未知 ")
    private Integer gender;

    @ApiModelProperty(value = "尊称 先生、女士、未知 ")
    private String genderName;

    @ApiModelProperty(value = "主账号")
    private String username;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "最后订单时间")
    private Date lastOrderDate;

    // 发票
    @NotNull(message = "开票类型不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "开票类型")
    private Integer invoiceType;

    @ApiModelProperty(value = "开票类型名称")
    private String invoiceTypeName;

    @NotBlank(message = "发票抬头不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "发票抬头")
    private String invoiceHead;

    @NotBlank(message = "纳税人识别号不能为空",groups = AddGroup.class)
    @ApiModelProperty(value = "纳税人识别号")
    private String invoiceCode;

    @ApiModelProperty(value = "开票地址")
    private String invoiceAddress;

    @ApiModelProperty(value = "开票电话")
    private String invoiceMobile;

    @ApiModelProperty(value = "开票行名称")
    private String invoiceBankName;

    @ApiModelProperty(value = "开票行账号")
    private String invoiceBankAccount;

    @ApiModelProperty(value = "电子发票邮箱")
    private String invoiceEmail;

    // 工商
    @ApiModelProperty(value = "工商类型")
    private Integer busiType;

    @ApiModelProperty(value = "工商类型名称")
    private String busiTypeName;

    @ApiModelProperty(value = "社会信用代码")
    private String busiSocialCreditCode;

    @ApiModelProperty(value = "企业名称")
    private String busiCompanyName;

    @ApiModelProperty(value = "营业期限")
    private String busiTerm;

    // 默认发货地址

    @ApiModelProperty(value = "收货标签")
    private String tag;

    @ApiModelProperty(value = "收货人")
    private String consignee;

    @ApiModelProperty(value = "收货地址")
    private String address;

    @ApiModelProperty(value = "省份id")
    private Long provinceId;

    @ApiModelProperty(value = "省份名称")
    private String provinceName;

    @ApiModelProperty(value = "地市id")
    private Long cityId;

    @ApiModelProperty(value = "地市名称")
    private String cityName;

    @ApiModelProperty(value = "区县id")
    private Long areaId;

    @ApiModelProperty(value = "区县名称")
    private String areaName;

    @ApiModelProperty(value = "联系方式")
    private String addressMobile;

    @ApiModelProperty(value = "是否默认地址 0 是 1否")
    private Integer defaulted;
}
